/*
 * Copyright (c) ShaoxiongDu <Shaoxiong.dev@aliyun.com> 2021 all Rights Reserved
 */

package zh.codegym.task.task09.task0905;

/* 
在堆栈跟踪的蓝色深度中…
*/

public class Solution {
    public static void main(String[] args) throws Exception {
        int deep = getStackTraceDepth();
        System.out.println(deep);
    }

    public static int getStackTraceDepth() {
        // 在此编写你的代码
        StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
        System.out.println(stackTrace.length);
        return stackTrace.length;
    }
}

